﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    public class Story : Content
    {
        public static readonly long StoryCommentNumber = 0;
        public string Title;
        public string Summary;
        public string Text;
        public List<Talkback> Talkbacks;
        public Story() { Text = string.Empty; Talkbacks = new List<Talkback>(); }
        public void AddTalkback(Talkback tb) { Talkbacks.Add(tb); }
        public override string ToString()
        {
            return Title;
        }
    }

    public class Talkback : Content
    {
        public string Name;
        public string Title;
        public string Text;
        public int Number;
        public long ID;
        public Uri ContentUri;
        //public Talkback(string name, string title, string text) { Name = name; Title = title; Text = text; }

        public Talkback(Talkback talkback)
        {
            Name = talkback.Name;
            Title = talkback.Title;
            Text = talkback.Text;
            DateTime = talkback.DateTime;
            Number = talkback.Number;
            ID = talkback.ID;
            if (talkback.Uri != null)
                ContentUri = new Uri(talkback.ContentUri.ToString());
            SiteName = talkback.SiteName;
            Uri = talkback.Uri;
            
        }
        public Talkback()
        {
            Name = string.Empty;
            Title = string.Empty;
            Text = string.Empty;
            DateTime = DateTime.MinValue;
        }
    }
}
